 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
 <html xmlns="http://www.w3.org/1999/xhtml">
 <head>
 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
 <title>短网址信息</title>
 <link href="<?php echo url_for('misc/');?>base.css" rel="stylesheet" type="text/css" />
</head>
<body>
<?php function get_color($str){
    $str    = $str % 2;
    if($str==0){
        return '#f9f9f9';
    }
    return '#f4f4f4';
}
?>
<div class="search_table_sk" >
        <div class="text">短网址：</div>
        <div class="search_sk"><input name="val" id="val" value="<?php echo $url;?>" type="text" class="search" /></div>
    <div class="an_sk"><a href="javascript:go();"><img src="<?php echo url_for('misc/');?>images/search_an.jpg" width="60" height="31" /></a></div>
    <div class="clear"></div>
</div>
<div class="list_table">
<table width="100%" border="0" cellspacing="0" cellpadding="0" id="u22_table">
  <tr style=" font-size:14px; color:#005b9b;">
    <td width="9%" height="35" bgcolor="#c7e8ff">用户编号</td>
    <td width="10%" bgcolor="#c7e8ff">用户昵称</td>
    <td width="42%" bgcolor="#c7e8ff">微博内容</td>
    <td width="11%" bgcolor="#c7e8ff">微博来源</td>
    <td width="15%" bgcolor="#c7e8ff">发表时间</td>
    <td width="13%" bgcolor="#c7e8ff">注册日期</td>
  </tr>
<?php if(isset($rs['share_statuses']) && !empty($rs['share_statuses'])):?>
        <?php foreach ($rs['share_statuses'] as $k => $v):?>
        <?php
        $time   = date("Y-m-d H:i:s",strtotime($v['created_at']));
        $created    = date("Y-m-d",strtotime($v['user']['created_at']));
        ?>    
          <tr>
            <td height="35" bgcolor="#f9f9f9"><a href="http://weibo.com/<?php echo $v['user']['id'];?>" target="_blank" title="新窗口打开"><?php echo $v['user']['id'];?></a></td>
            <td bgcolor="<?php echo get_color($k);?>" ><?php echo $v['user']['screen_name'];?></td>
            <td bgcolor="<?php echo get_color($k);?>"><?php echo $v['text'];?></td>
            <td bgcolor="<?php echo get_color($k);?>"><?php echo str_replace('<a','<a target="_blank"',$v['source']);?></td>
            <td bgcolor="<?php echo get_color($k);?>"><?php echo $time;?></td>
            <td bgcolor="<?php echo get_color($k);?>"><?php echo $created;?></td>
          </tr>
        <?php endforeach;?>
    <?php else:?>
  <tr>
      <td bgcolor="#f9f9f9" colspan="6">没有查找到记录</td>
  </tr>    
<?php endif; ?>    
 
</table>
    <script type="text/javascript" src="<?php echo url_for('misc/js/jquery-1.6.4.min.js');?>"></script>
<script type="text/javascript">
    $(document).keypress(function(e){
        if(e.which==13){
            go();
        }
    });    
    function go(){
        var url = document.getElementById('val').value;
        if('' !=url){
            window.location.href= 'sinaurl?url='+url;
        }else{
            alert('请输入6位短网址');
        }
    }
</script>
</div>
</body>
</html>
